#include <iostream>
using namespace std;

void reverseString(char * str){
    //i指向第一位，j指向最后一位
    int i = 0,j = sizeof(str)/sizeof(char)-1;
    char temp;
    for(j = j - 1;i < j;i++,j--)//逆转字符串
    {
        temp = str[i];
        str[i] = str[j];
        str[j] = temp;
    }
}

int main(){
    char str[] = {'a','b','c'};
    reverseString(str);
    cout << str << endl;
    return 1;
}